#ifndef SR04_H
#define SR04_H

#include<wiringPi.h>
#include<stdio.h>
#include<sys/time.h>
#include<cstddef>
#include<iostream>
#include<algorithm>
using namespace std;

#define SR04_NUM 15

class SR04 {
public:
	
	SR04(int echoPin, int triggerPin);

	long Distance();
	long Filter_Distance();

private:	
	int _echoPin, _triggerPin;
	long _duration;
	long start_time,end_time;
};
#endif



